use std::fmt::Display;

fn main() {
    //类型转换
    let i = 30;
    let m = "32";
    let s = String::from("100");
    //字符串转数字
    let s_to_i = s.parse::<i32>();
    println!("s_to_i={:?}", s_to_i);

    let s_to_f64 = s.parse::<f64>().unwrap();
    println!("s_to_f64={}", s_to_f64);

    //数字转字符串
    let i_to_s = i.to_string();
    println!("数字{}_转_字符串 = {}", i, i_to_s);

    //字符串引用转数字
    let m_to_i = m.parse::<i32>();
    println!("{:?}", m_to_i);

    let fs = pirnt_r(12333);
    println!("{}", fs);
}

fn pirnt_r<T>(t: T) -> T {
    t
}
